package com.tarena.lbs.content.controller;

import com.tarena.lbs.base.protocol.model.Result;
import com.tarena.lbs.base.protocol.pager.PageResult;
import com.tarena.lbs.content.assemble.CategoryAssembler;
import com.tarena.lbs.pojo.content.dto.ArticleCategoryDTO;
import com.tarena.lbs.pojo.content.query.ArticleCategoryQuery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class CategoryController {
    @Autowired
    private CategoryAssembler categoryAssembler;
    @GetMapping("/admin/content/category/list")
    public Result<PageResult<ArticleCategoryDTO>> catsList(ArticleCategoryQuery query){
        PageResult<ArticleCategoryDTO> pages=categoryAssembler.assembleCategoryPage();
        return new Result<>(pages);
    }
}
